package com.xinyue.game.service.framwork;

import com.xinyue.cross.server.server.NettyServerService;
import com.xinyue.game.service.framwork.context.GameServerRequestListener;
import com.xinyue.game.service.framwork.mapping.GameHandlerMappingManager;
import org.springframework.context.ApplicationContext;

/**
 * @author 王广帅
 * @since 2023/7/12 20:37
 **/
public class GameServiceApplication {

    public static void run(ApplicationContext context) {
        GameHandlerMappingManager.getInstance().scanGameHandler(context);
        NettyServerService serverService = new NettyServerService(context);
        serverService.start(new GameServerRequestListener(context));
    }
}
